package cc.lj.internal.coupons.infrastructure.repository;

import cc.lj.internal.core.model.PageParam;
import cc.lj.internal.coupons.domain.martcap.repository.ICapBatchRepository;
import cc.lj.internal.coupons.infrastructure.po.CapBatchPO;
import cc.lj.internal.coupons.infrastructure.repository.mysql.CapBatchMysqlRespository;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;


/**
 * 封顶额活动批次表仓储实现
 * @author liangxifeng
 * @date 2021-12-11
 */
@Repository("capBatchRepository")
public class CapBatchRepository implements ICapBatchRepository {
    @Resource(name="capBatchMysqlRespository")
    private CapBatchMysqlRespository repository;

    @Override
    public Integer insert(CapBatchPO entityPO) {
        return repository.insert(entityPO);
    }

    @Override
    public Integer updateById(CapBatchPO entityPO) {
        return repository.updateById(entityPO);
    }

    @Override
    public CapBatchPO getById(Integer id) {
        CapBatchPO entityPO = repository.getById(id);
        return entityPO;
    }

    @Override
    public PageInfo<CapBatchPO> selectPage(PageParam pageParam) {
        return repository.selectPage(pageParam);
    }

    @Override
    public List<CapBatchPO> getList(CapBatchPO activityBatchRationPO) {
        return repository.getList(activityBatchRationPO);
    }

    @Override
    public Integer deleteById(Integer id) {
        return repository.deleteById(id);
    }

}
